#!/usr/bin/env ruby
$:.push File.expand_path("../../lib", __FILE__)
require "htmr"

app = HTMr::Application.new "My App" do
  header :width => "500", :style => "color: white;" do
    h1 "Hello World", :style => "color: black;" do
      on :click, %Q{
        clicked = document.getElementById("clicked");
        clicked.innerHTML = "You clicked a #{@cur_elem} tag!"
      }
    end
  end
  section "hi" do
    p "hello", :style => "color: black;" do
      p "world" do
        on :click, %Q{
          clicked = document.getElementById("clicked");
          clicked.innerHTML = "You clicked a #{@cur_elem} tag!"
        }
      end
    end
  end
end
puts app.render